﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace Zongbao
{
    [Designer(typeof(TongJi_EMS._TJ_Basic.TJ_BasicControlDesigner))]
    public partial class zongbao : TongJi_EMS._TJ_Basic.TJ_BasicControl
    {
        public zongbao()
        {
            InitializeComponent();
            this.NeedPoint = true;
        }

        private void zongbao_Load(object sender, EventArgs e)
        {
            zongbao_Resize(sender, e);
        }
        private string bol = "0";//通断状态信号
        [CategoryAttribute("Data")]

        public string Bol
        {
            get { return bol; }
            set { bol = value; }

        }
        private void zongbao_Paint(object sender, PaintEventArgs e)
        {
          // if (bol = "0")
           // { this.BackgroundImage =TongJi_EMS.Properties.Resources.}
            //    //zb_Alarm = true;
            //    if (bol == "0")
            //    {
            //        e.Graphics.FillRectangle(Brushes.Red, x * 0.3f, y * 0.3f, x * 1.4f, y * 0.7f);

            //    }
            //    else
            //    {
            //        e.Graphics.FillRectangle(Brushes.Green, x * 0.3f, y * 0.3f, x * 1.4f, y * 0.7f);
            //    }
            //    e.Graphics.FillRectangle(Brushes.DarkBlue, 0, 0, x * 2f, y * 0.3f);
            //    e.Graphics.FillRectangle(Brushes.DarkBlue, 0, 0, x * 0.3f, y * 2f);
            //    e.Graphics.FillRectangle(Brushes.DarkBlue, x * 1.7f, 0, x * 0.3f, y * 2f);
            //    e.Graphics.FillRectangle(Brushes.DarkBlue, 0, y, x * 2f, y);
            //    e.Graphics.FillRectangle(Brushes.White, x * 0.3f, y * 1.5f, x * 0.35f, y * 0.1f);
            //    e.Graphics.FillRectangle(Brushes.White, x * 1.3f, y * 1.5f, x * 0.35f, y * 0.1f);


        }

        private void zongbao_Resize(object sender, EventArgs e)
        {
            this.x = this.Width / 2;
            this.y = this.Height / 2;
            Refresh();
        }


    }
}